package edu.boun.g4.coursity.domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author sebnemarslan
 * @author mertusta
 * 
 */
@Entity
@Table(name = "RATING")
public class Rating implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "ID")
	@GeneratedValue
	private Integer id;	
	
	@Column(name = "RATING_SCORE")
	private Integer ratingScore;

		
	@ManyToOne
	@JoinColumn(name="coursityUser_ID")	
	private CoursityUser coursityUser;
	
	
	@ManyToOne
	@JoinColumn(name="course_COURSE_ID")	
	private Course course;
	
	
	public Rating() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	
	public CoursityUser getCousityUser() {
		return coursityUser;
	}

	public void setCousityUser(CoursityUser coursityUser) {
		this.coursityUser = coursityUser;
	}
	
	
	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}
	
	
	public Integer getRatingScore() {
		return ratingScore;
	}

	public void setRatingScore(Integer ratingScore) {
		this.ratingScore = ratingScore;
	}
	

}
